package com.taobao.top.beans;

import com.taobao.top.domain.User;
 
/**
 * OAuth2.0 认证参数实体类
 * 
 * @author <a href="http://weibo.com/shichaosong">Shichao Song</a> 
 * @Data 2011-10-17
 * @QQ 421271944
 * @Version 1.0
 */
public class OAuth2 {
	private String app_key = "12344741"; // TOP分配给应用的AppKey
	private String app_secret = "93d5bcb5dcf77dcc1c3ff26a5d3fc4ff"; // TOP分配给应用的AppKey
	private String method = ""; // API接口名称
	private String session = ""; // TOP分配给用户的SessionKey
	private String timestamp = ""; // 时间戳(格式为yyyy-MM-dd HH:mm:ss)
	private String format = "";
	private String v = "2.0"; // API协议版本，可选值:2.0。
	private String sign = ""; // API输入参数签名结果
	private String sign_method = "md5"; // 参数的加密方法选择，可选值是：md5,hmac。这个参数只存在于2.0中。	 
	private User user = new User(); // 个人信息	
	private String callbackurl = "null"; // 认证成功后浏览器会被重定向到这个url中
	private String status; 
	
	public OAuth2(){
		super();
	}
	
	public OAuth2(String callback) {
		super();
		this.callbackurl = callback;
	}
	
	public OAuth2(String app_key,String app_secret,String callback) {
		super();
		this.app_key = app_key;
		this.app_secret = app_secret;
		this.callbackurl = callback;
	}
	
	public String getApp_key() {
		return app_key;
	}

	public void setApp_key(String app_key) {
		this.app_key = app_key;
	}

	public String getApp_secret() {
		return app_secret;
	}

	public void setApp_secret(String app_secret) {
		this.app_secret = app_secret;
	}

	public String getMethod() {
		return method;
	}

	public void setMethod(String method) {
		this.method = method;
	}

	public String getSession() {
		return session;
	}

	public void setSession(String session) {
		this.session = session;
	}

	public String getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(String timestamp) {
		this.timestamp = timestamp;
	}

	public String getFormat() {
		return format;
	}

	public void setFormat(String format) {
		this.format = format;
	}

	public String getV() {
		return v;
	}

	public void setV(String v) {
		this.v = v;
	}

	public String getSign() {
		return sign;
	}

	public void setSign(String sign) {
		this.sign = sign;
	}

	public String getSign_method() {
		return sign_method;
	}

	public void setSign_method(String sign_method) {
		this.sign_method = sign_method;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getCallbackurl() {
		return callbackurl;
	}

	public void setCallbackurl(String callbackurl) {
		this.callbackurl = callbackurl;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
 
}
